
import {API_ROOT} from '../config'
import { fetch,postData,postJson } from '../service/httpService'
 
//登录
export function postLogin(body){
	return postJson(API_ROOT+'login',body)
}
//code 获取用户信息
export function wxCallback(body){
	return fetch(API_ROOT+'wx/callback',body)
} 

//banner列表
export function fetchBannerList(body){
	return fetch(API_ROOT+'banner/list',body)
}


//正在直播列表
export function fetchPlaySubject(body){
	return fetch(API_ROOT+'play/subject/list',body)
}

//课程列表
export function fetchSectionList(body){
	return fetch(API_ROOT+'section/list',body)
}

//订阅id不是课程id   订阅课程下的课程列表
export function fetchSectionSubjectList(body){
	return fetch(API_ROOT+'section/subject/list/'+body)
}
//即将上课详情
export function fetchSectionSubjectDetail(body){
	return fetch(API_ROOT+'section/subject/detail',body)
}

//直播课程详情
export function fetchSectionDetail(body){
	return fetch(API_ROOT+'section/detail',body)
}

//订阅课程
export function postSectionReserve(body){
	return postJson(API_ROOT+'section/reserve',body)
}

//进入直播间
export function postJsonSubjectPlay(body){
	return postJson(API_ROOT+'section/subject/play',body)
}



//列表
export function fetchSubjectFree(body){
	return fetch(API_ROOT+'section/list',body)
}
//全部课程
export function fetchSubjectList(body){
	return fetch(API_ROOT+'subject/list',body)
}

//vip课程(全部推荐课程)
export function fetchVipList(body){
	return fetch(API_ROOT+'subject/vip',body)
}

//增加课程播放次数
export function fetchPlayList(body){
	return fetch(API_ROOT+'subject/play',body)
}

//商品分类
export function fetchGoodsCategory(body){
	return fetch(API_ROOT+'goods/category',body)
}

//商品列表
export function fetchGoodsList(body){
	return fetch(API_ROOT+'goods/list',body)
}

//商品详情
export function fetchGoodsDetail(body){
	return fetch(API_ROOT+'goods/detail',body)
}
 
//加入城市驿站
export function postServiceJoin(body){
	return postJson(API_ROOT+'user/service/join',body)
}
 
//是否加入城市驿站
export function fetchServiceState(body){
	return fetch(API_ROOT+'user/service',body)
}



